package com.gage.model;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.hibernate.validator.constraints.NotBlank;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;

@TableName("sys_base_dict")
public class SysBaseDict implements Serializable {

	/**
	 * 字典信息
	 */
	@TableField(exist = false)
	private static final long serialVersionUID = -4603114664423150840L;
	private String id;
	@NotBlank
	private String dictcode;
	private String parentid;
	private String dictname;
	private String remark;
	private Integer dictlevel;
	private Integer sequence;
	private String status;
	private String insertid;
	private String updateid;
	@TableField(exist = false)
	private SysUser useri;
	@TableField(exist = false)
	private SysUser useru;
	@TableField(exist = false)
	private List<SysBaseDict> child;

	@TableField(value = "insert_date")
    private Date insertDate;
	@TableField(value = "update_date")
	private Date updateDate;
    public Date getInsertDate() {
		return insertDate;
	}

	public void setInsertDate(Date insertDate) {
		this.insertDate = insertDate;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}
	public String getId()
	{
		return id;
	}

	public void setId(String id)
	{
		this.id = id;
	}

	public String getParentid()
	{
		return parentid;
	}

	public void setParentid(String parentid)
	{
		this.parentid = parentid;
	}

	public String getDictcode()
	{
		return dictcode;
	}

	public void setDictcode(String dictcode)
	{
		this.dictcode = dictcode;
	}

	public String getDictname()
	{
		return dictname;
	}

	public void setDictname(String dictname)
	{
		this.dictname = dictname;
	}

	public String getRemark()
	{
		return remark;
	}

	public void setRemark(String remark)
	{
		this.remark = remark;
	}

	public Integer getSequence()
	{
		return sequence;
	}

	public void setSequence(Integer sequence)
	{
		this.sequence = sequence;
	}

	public String getStatus()
	{
		return status;
	}

	public void setStatus(String status)
	{
		this.status = status;
	}

	public String getInsertid()
	{
		return insertid;
	}

	public void setInsertid(String insertid)
	{
		this.insertid = insertid;
	}

	public String getUpdateid()
	{
		return updateid;
	}

	public void setUpdateid(String updateid)
	{
		this.updateid = updateid;
	}

	public SysUser getUseri()
	{
		return useri;
	}

	public void setUseri(SysUser useri)
	{
		this.useri = useri;
	}

	public SysUser getUseru()
	{
		return useru;
	}

	public void setUseru(SysUser useru)
	{
		this.useru = useru;
	}

	public Integer getDictlevel()
	{
		return dictlevel;
	}

	public void setDictlevel(Integer dictlevel)
	{
		this.dictlevel = dictlevel;
	}

	public List<SysBaseDict> getChild()
	{
		return child;
	}

	public void setChild(List<SysBaseDict> child)
	{
		this.child = child;
	}

	public String toString()
	{
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId())
				.append("dictcode", this.getDictcode()).append("parentid", this.getParentid())
				.append("dictlevel", this.getDictlevel()).append("dictname", getDictname())
				.append("remark", this.getRemark()).append("Sequence", this.getSequence())
				.append("status", this.getStatus()).append("InsertDate", this.getInsertDate())
				.append("UpdateDate", this.getUpdateDate()).toString();
	}

	public int hashCode()
	{
		return new HashCodeBuilder().append(getId()).toHashCode();
	}

	public boolean equals(Object obj)
	{
		if (obj instanceof SysBaseDict == false)
			return false;
		if (this == obj)
			return true;
		SysBaseDict other = (SysBaseDict) obj;
		return new EqualsBuilder().append(getId(), other.getId()).isEquals();
	}

}
